Ext.ns('Zayso');
Ext.ns('Zayso.Grid');
Ext.ns('Zayso.Store');

Zayso.Grid.Volunteer = Ext.extend(Ext.grid.GridPanel, 
{
	initComponent: function() {

    var store = new Ext.data.JsonStore({
    	//url:     'hsc.php',
        //method: 'GET',
        root:   'items',
        id:     'aysoid',
        fields: [
        	'aysoid',
    		'lname',
    		'fname'
  		],
  		sortInfo: {field: 'lname', direction: 'ASC'}
    });
    // store.load();
    Zayso.Store.Volunteer = store;
    
        var config = {
            store: store,
            columns: [
              {id:'aysoid',
               header: "AYSOID",     width: 100, sortable: true, dataIndex: 'aysoid'},
              {header: "Last Name",  width: 100, sortable: true, dataIndex: 'lname'},
              {header: "First Name", width: 100, sortable: true, dataIndex: 'fname'}
            ],
            stripeRows: true,
          //autoExpandColumn: 'id',
            height: 300,
            width:  600,
            title:'EAYSO Volunteers',
            id: 'zayso-grid-volunteer'
        };
        // apply config
        Ext.apply(this, Ext.apply(this.initialConfig, config));

        Zayso.Grid.Volunteer.superclass.initComponent.apply(this,arguments);
	}
});
Ext.reg('Zayso.Grid.Volunteer',Zayso.Grid.Volunteer);